package com.woniuxy.order.service.impl;

import com.woniuxy.order.entity.Statistics;
import com.woniuxy.order.mapper.StatisticsMapper;
import com.woniuxy.order.service.IStatisticsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2025-05-13
 */
@Service
public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statistics> implements IStatisticsService {

    @Override
    public List<Statistics> getStatisticsByMonth(String month) throws Exception {
        // 这里实现具体的查询逻辑，例如：
        return lambdaQuery()
                .apply("DATE_FORMAT(create_time,'%Y-%m') = {0}", month)
                .list();
    }
}
